//
//  CCLoginView.m
//  BuDeJie
//
//  Created by demoncraz on 2017/2/12.
//  Copyright © 2017年 demoncraz. All rights reserved.
//

#import "CCLoginView.h"

@interface CCLoginView ()

@property (weak, nonatomic) IBOutlet UIButton *logInButton;


@end

@implementation CCLoginView


+ (instancetype)loginView {
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];;
}

+ (instancetype)registerView {
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    UIImage *bgImage = self.logInButton.currentBackgroundImage;

    [self.logInButton setBackgroundImage:[bgImage stretchableImageWithLeftCapWidth:bgImage.size.width * 0.5 topCapHeight:bgImage.size.height * 0.5] forState:UIControlStateNormal];
    
}

@end
